Optimal. Leaf size=285 \[ \frac {(2 m+1) (i A (5-4 m)+4 B m+B) \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{6 a^2 d}+\frac {(A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{4 a d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {(A (5-4 m)-i (4 B m+B)) \tan ^{m+1}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.98, antiderivative size = 285, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3596, 3601, 3564, 135, 133, 3599, 67, 65} \[ \frac {(2 m+1) (i A (5-4 m)+4 B m+B) \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{6 a^2 d}+\frac {(A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{4 a d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {(A (5-4 m)-i (4 B m+B)) \tan ^{m+1}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 67
Rule 133
Rule 135
Rule 3564
Rule 3596
Rule 3599
Rule 3601
Rubi steps
\begin {align*} \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {\int \frac {\tan ^m(c+d x) \left (a (A (2-m)-i B (1+m))-\frac {1}{2} a (i A-B) (1-2 m) \tan (c+d x)\right )}{\sqrt {a+i a \tan (c+d x)}} \, dx}{3 a^2}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {(A (5-4 m)-i (B+4 B m)) \tan ^{1+m}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}+\frac {\int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-\frac {1}{2} a^2 \left (i B \left (1-3 m-4 m^2\right )+A \left (1+3 m-4 m^2\right )\right )+\frac {1}{4} a^2 (1+2 m) (B+i A (5-4 m)+4 B m) \tan (c+d x)\right ) \, dx}{3 a^4}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {(A (5-4 m)-i (B+4 B m)) \tan ^{1+m}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx}{4 a^2}-\frac {((1+2 m) (A (5-4 m)-i (B+4 B m))) \int \tan ^m(c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx}{12 a^3}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {(A (5-4 m)-i (B+4 B m)) \tan ^{1+m}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}+\frac {(i A+B) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {a+x} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{4 d}-\frac {((1+2 m) (A (5-4 m)-i (B+4 B m))) \operatorname {Subst}\left (\int \frac {x^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{12 a d}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {(A (5-4 m)-i (B+4 B m)) \tan ^{1+m}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}-\frac {\left ((1+2 m) (A (5-4 m)-i (B+4 B m)) (-i \tan (c+d x))^{-m} \tan ^m(c+d x)\right ) \operatorname {Subst}\left (\int \frac {(-i x)^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{12 a d}+\frac {\left ((i A+B) \sqrt {1+i \tan (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {1+\frac {x}{a}} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{4 d \sqrt {a+i a \tan (c+d x)}}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {(A (5-4 m)-i (B+4 B m)) \tan ^{1+m}(c+d x)}{6 a d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) F_1\left (1+m;\frac {1}{2},1;2+m;-i \tan (c+d x),i \tan (c+d x)\right ) \sqrt {1+i \tan (c+d x)} \tan ^{1+m}(c+d x)}{4 a d (1+m) \sqrt {a+i a \tan (c+d x)}}+\frac {(1+2 m) (B+i A (5-4 m)+4 B m) \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};1+i \tan (c+d x)\right ) (-i \tan (c+d x))^{-m} \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)}}{6 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 17.14, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.74, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\sqrt {2} {\left ({\left (A - i \, B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, A e^{\left (2 i \, d x + 2 i \, c\right )} + A + i \, B\right )} \left (\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (-3 i \, d x - 3 i \, c\right )}}{4 \, a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.78, size = 0, normalized size = 0.00 \[ \int \frac {\left (\tan ^{m}\left (d x +c \right )\right ) \left (A +B \tan \left (d x +c \right )\right )}{\left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}}{\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________